﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace XqWebSite
{
    public partial class WebForm34 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)//判断是否回发
            {
               
            }
        }
        
        


        protected void Button2_Click(object sender, EventArgs e)
        {
            string SQL = "";
            bool iRet = false;
            string id = Tex_id.Text;
            //string id = Request["ID"].ToString();
                SQL = "update Xunluo set XunluoShijian ='" + Tex_xlsj.Text + "',XunluoJieguo ='" + Tex_xljg.Text
                      +"' where ID='" + id + "'";//执行更新操作
                iRet = DBHelper.ExecSql(SQL);
            

            if (iRet)
            {
                DBHelper.ShowMessage(Page, "恭喜您，操作成功！", "");
                Tex_id.Text = "";
                Tex_xlsj.Text = "";
                Tex_xljg.Text = "";
                //Response.Redirect("XunluojieguoFk.aspx");
            }
            else
            {
                DBHelper.ShowMessage(Page, "对不起，操作失败！", "");
            }
            
        }

        protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
        {

        }

        protected void But_qx_Click(object sender, EventArgs e)
        {
            Tex_id.Text = "";
            Tex_xlsj.Text = "";
            Tex_xljg.Text = "";
            Response.Redirect("XunluojieguoFk.aspx");
        }
    }
}